/**
 *
 */
package com.zhuoyue.elmt.service;

import java.util.List;

import com.zhuoyue.elmt.entity.MaintenanceContract;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.eit.eitsite.common.persistence.Page;
import com.eit.eitsite.common.service.CrudService;
import com.zhuoyue.elmt.entity.MaintenanceContractDevice;
import com.zhuoyue.elmt.dao.MaintenanceContractDeviceDao;

/**
 * 维保合同备案设备信息Service
 * @author chenhao
 * @version 2016-09-11
 */
@Service
@Transactional(readOnly = true)
public class MaintenanceContractDeviceService extends CrudService<MaintenanceContractDeviceDao, MaintenanceContractDevice> {

	public MaintenanceContractDevice get(String id) {
		return super.get(id);
	}
	
	public List<MaintenanceContractDevice> findList(MaintenanceContractDevice maintenanceContractDevice) {
		return super.findList(maintenanceContractDevice);
	}
	
	public Page<MaintenanceContractDevice> findPage(Page<MaintenanceContractDevice> page, MaintenanceContractDevice maintenanceContractDevice) {
		return super.findPage(page, maintenanceContractDevice);
	}
	
	@Transactional(readOnly = false)
	public void save(MaintenanceContractDevice maintenanceContractDevice) {
		super.save(maintenanceContractDevice);
	}
	
	@Transactional(readOnly = false)
	public void delete(MaintenanceContractDevice maintenanceContractDevice) {
		super.delete(maintenanceContractDevice);
	}

	@Transactional(readOnly = false)
	public void insert(MaintenanceContractDevice maintenanceContractDevice) {
		//maintenanceContractDevice.preInsert();
		dao.insert(maintenanceContractDevice);
	}

	@Transactional(readOnly = false)
	public void update(MaintenanceContractDevice maintenanceContractDevice) {
		dao.update(maintenanceContractDevice);
	}

	public MaintenanceContract getByDeviceCode(String deviceCode){
		return dao.getByDeviceCode(deviceCode);
	}

	public List<MaintenanceContractDevice> getByContractNo(MaintenanceContractDevice maintenanceContractDevice){
		return  dao.getByContractNo(maintenanceContractDevice);
	}
}